/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;

namespace VOL.Entity.DomainModels
{
    [Entity(TableCnName = "月度考勤",TableName = "Month_Asses")]
    public partial class Month_Asses:BaseEntity
    {
        /// <summary>
       ///事业部
       /// </summary>
       [Display(Name ="事业部")]
       [MaxLength(255)]
       [Column(TypeName="varchar(255)")]
       public string Division { get; set; }

       /// <summary>
       ///主键
       /// </summary>
       [Key]
       [Display(Name ="主键")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int MonthAssesId { get; set; }

       /// <summary>
       ///业务经理
       /// </summary>
       [Display(Name ="业务经理")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Person { get; set; }

       /// <summary>
       ///月份
       /// </summary>
       [Display(Name ="月份")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Month { get; set; }

       /// <summary>
       ///合计
       /// </summary>
       [Display(Name ="合计")]
       [Column(TypeName="int")]
       public int? Total { get; set; }

       /// <summary>
       ///请假
       /// </summary>
       [Display(Name ="请假")]
       [Column(TypeName="int")]
       public int? AskForLeave { get; set; }

       /// <summary>
       ///出差
       /// </summary>
       [Display(Name ="出差")]
       [Column(TypeName="int")]
       public int? Travel { get; set; }

       /// <summary>
       ///出勤
       /// </summary>
       [Display(Name ="出勤")]
       [Column(TypeName="int")]
       public int? Attendance { get; set; }

       /// <summary>
       ///未打卡
       /// </summary>
       [Display(Name ="未打卡")]
       [Column(TypeName="int")]
       public int? Absence { get; set; }

       /// <summary>
       ///休息
       /// </summary>
       [Display(Name ="休息")]
       [Column(TypeName="int")]
       public int? Rest { get; set; }

       /// <summary>
       ///1号
       /// </summary>
       [Display(Name ="1号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day1 { get; set; }

       /// <summary>
       ///2号
       /// </summary>
       [Display(Name ="2号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day2 { get; set; }

       /// <summary>
       ///3号
       /// </summary>
       [Display(Name ="3号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day3 { get; set; }

       /// <summary>
       ///4号
       /// </summary>
       [Display(Name ="4号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day4 { get; set; }

       /// <summary>
       ///5号
       /// </summary>
       [Display(Name ="5号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day5 { get; set; }

       /// <summary>
       ///6号
       /// </summary>
       [Display(Name ="6号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day6 { get; set; }

       /// <summary>
       ///7号
       /// </summary>
       [Display(Name ="7号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day7 { get; set; }

       /// <summary>
       ///8号
       /// </summary>
       [Display(Name ="8号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day8 { get; set; }

       /// <summary>
       ///9号
       /// </summary>
       [Display(Name ="9号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day9 { get; set; }

       /// <summary>
       ///10号
       /// </summary>
       [Display(Name ="10号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day10 { get; set; }

       /// <summary>
       ///11号
       /// </summary>
       [Display(Name ="11号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day11 { get; set; }

       /// <summary>
       ///12号
       /// </summary>
       [Display(Name ="12号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day12 { get; set; }

       /// <summary>
       ///13号
       /// </summary>
       [Display(Name ="13号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day13 { get; set; }

       /// <summary>
       ///14号
       /// </summary>
       [Display(Name ="14号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day14 { get; set; }

       /// <summary>
       ///15号
       /// </summary>
       [Display(Name ="15号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day15 { get; set; }

       /// <summary>
       ///16号
       /// </summary>
       [Display(Name ="16号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day16 { get; set; }

       /// <summary>
       ///17号
       /// </summary>
       [Display(Name ="17号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day17 { get; set; }

       /// <summary>
       ///18号
       /// </summary>
       [Display(Name ="18号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day18 { get; set; }

       /// <summary>
       ///19号
       /// </summary>
       [Display(Name ="19号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day19 { get; set; }

       /// <summary>
       ///20号
       /// </summary>
       [Display(Name ="20号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day20 { get; set; }

       /// <summary>
       ///21号
       /// </summary>
       [Display(Name ="21号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day21 { get; set; }

       /// <summary>
       ///22号
       /// </summary>
       [Display(Name ="22号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day22 { get; set; }

       /// <summary>
       ///23号
       /// </summary>
       [Display(Name ="23号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day23 { get; set; }

       /// <summary>
       ///24号
       /// </summary>
       [Display(Name ="24号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day24 { get; set; }

       /// <summary>
       ///25号
       /// </summary>
       [Display(Name ="25号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day25 { get; set; }

       /// <summary>
       ///26号
       /// </summary>
       [Display(Name ="26号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day26 { get; set; }

       /// <summary>
       ///27号
       /// </summary>
       [Display(Name ="27号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day27 { get; set; }

       /// <summary>
       ///28号
       /// </summary>
       [Display(Name ="28号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day28 { get; set; }

       /// <summary>
       ///29号
       /// </summary>
       [Display(Name ="29号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day29 { get; set; }

       /// <summary>
       ///30号
       /// </summary>
       [Display(Name ="30号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day30 { get; set; }

       /// <summary>
       ///31号
       /// </summary>
       [Display(Name ="31号")]
       [MaxLength(25)]
       [Column(TypeName="varchar(25)")]
       public string Day31 { get; set; }


        public void SetDayData(int Day, string data)
        {
            string propertyName = "Day" + Day;
            var property = GetType().GetProperty(propertyName);
            if (property != null && property.PropertyType == typeof(string))
            {
                property.SetValue(this, data);
            }
        }

    }
}